/*
 * @Description:
 * @Autor: zhangbing
 * @Date: 2021-06-15 15:56:18
 * @LastEditors: zhangbing
 * @LastEditTime: 2021-06-15 21:16:35
 */

import React, { Component } from 'react'
import ToDoItem from '../ToDoItem/index.js'

export default class List extends Component {
  render() {
    const { todos, updateToDo, deleteToDo } = this.props
    return (
      <div>
        {todos.map(todo => {
          return <ToDoItem todo={todo} key={todo.id} updateToDo={updateToDo} deleteToDo={deleteToDo}/>
        })}
      </div>
    )
  }
}
